package com.jhsw.roadsun.module.business.controller.admin.user.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.write.style.ColumnWidth;
import cn.idev.excel.annotation.write.style.ContentRowHeight;
import com.jhsw.roadsun.framework.excel.core.annotations.DictFormat;
import com.jhsw.roadsun.framework.excel.core.convert.DictConvert;
import com.jhsw.roadsun.module.business.config.convert.UrlStrImageConverter;
import com.jhsw.roadsun.module.infra.enums.DictTypeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 用户信息 Response VO")
@Data
@ContentRowHeight(50)
@ExcelIgnoreUnannotated
public class BizUserRespVO {

    @Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9670")
    @ExcelProperty("ID")
    private Long id;

    @Schema(description = "头像", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "头像", converter = UrlStrImageConverter.class)
    @ColumnWidth(12)
    private String avatar;

    @Schema(description = "昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @ExcelProperty("昵称")
    private String nickname;

    @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("手机号")
    private String mobile;

    @Schema(description = "已寄快递", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("已寄快递")
    private Long expressageCount;

    @Schema(description = "收件地址数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("收件地址数量")
    private Long recipientsAddressCount;

    @Schema(description = "寄件地址数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("寄件地址数量")
    private Long sendAddressCount;

    @Schema(description = "是否禁用", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "是否禁用", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.BOOLEAN_STRING)
    private Boolean status;

    @Schema(description = "注册时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("注册时间")
    private LocalDateTime createTime;

    @Schema(description = "备注", example = "你说的对")
    @ExcelProperty("备注")
    private String remark;
}
